﻿@using WanFang.Test
@model List<JianCeTemplate>
@{
    Layout = "~/Views/Shared/_TestLayout.cshtml";
    Material m = ViewBag.Material;
}
@section headSec{
    <style type="text/css">
        .textstyle1 {
            color: Red;
            font-weight: bold;
        }

        .textstyle2 {
            color: Green;
            font-weight: bold;
        }
    </style>

    <script type="text/javascript">
        $(document).ready(function() {
            //上传
            $('form').submit(function () {
                $(this).ajaxSubmit({
                    type: 'post',
                    url: location.href,
                    dataType: 'json',
                    success: function (data) {
                        if (data.result.errcode == 0) {
                            alert("成功");
                            location.reload();
                        } else {
                            alert("失败");
                        }
                    }
                })
                return false;
            })
        });
    </script>
}
    <form>
        <p>@m.Name</p>
        <div style="padding:10px;">
            @foreach (var item in Model)
    {
                <p>@item.Name:<input type="text" id="@item.FField" name="@item.FField" /></p>
    }
            <p><button id="btn" type="submit">保存</button></p> @Html.AntiForgeryToken()
        </div>
    </form>
